
$(document).ready(function () {
var	link ="http://gomashup.com/json.php?fds=geo/timezone/locations&jsoncallback=";
simpleserviceWithJsonp(link,LoadTimeZoneSuccess,null,4000);
});

function LoadTimeZoneSuccess(data,obj)
{
	
	$("[name*=chick_to_change_time_zone]:visible").click(function () {
		var dom = $("#gennerlic_timezone-dropdown");
		var  timeZone = data.result;
		fillSimpleDropdownWithAttr(dom,timeZone,"TimeZoneId","TimeZoneId","GMT",seted,'false',"witdh:200px");
	});
}

function GetTimeZoneSuccess(obj)
{
	var TimeZone =obj.select.find(":selected").text();
	var GMT =obj.select.find(":selected").val();
	var link = "/generlicLogicService?func=editTimeZone&timeZone="+TimeZone+"&GMT="+GMT;
simpleserviceWithArgs(link,null,InsertTimeZoneSuccess,obj);
}

function InsertTimeZoneSuccess(data,obj)
{
	
	var datas = JSON.parse(data);
	if(datas  != true){
		simpleDialog(saveFail_label);
	}
	else
	{
		obj.dom.text(obj.select.find(":selected").text());
	}
}